﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Paginas_Logado/MasterPageLogado.Master" AutoEventWireup="true" CodeBehind="ClienteVeiculos.aspx.cs" Inherits="WEB_MechSysWeb.Paginas_Logado.ClienteVeiculos" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        #divDados {
            height: 197px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMaster" runat="server">
    <asp:UpdatePanel ID="UpdatePanelGeral" runat="server">
        <ContentTemplate>
            <div id="divPagina" style="height: 1240px">
                <div id="divTitulo" class="divTituloPerfilDados">
                    <asp:Image ID="imgIcone" runat="server" CssClass="imgIconTitulo" Height="25px" ImageUrl="~/Imagens/logo-veiculos.png" Width="29px" />
                    Meus Veículos
                </div>

                <div id="divGrid" style="height: 216px" class="divGridVe">
                    <div class="divHeaderCad">Veículos Cadastrados</div>
                    <asp:GridView ID="gridVeiculos" runat="server" Height="16px" Width="630px" AutoGenerateColumns="False" BackColor="#F3F3F3" BorderColor="#333333" BorderStyle="Groove" BorderWidth="3px" OnSelectedIndexChanged="gridVeiculos_SelectedIndexChanged1" DataKeyNames="VeiculoID">
                        <AlternatingRowStyle BackColor="#CCCCCC" BorderColor="#333333" BorderStyle="Outset" BorderWidth="3px" ForeColor="Black" />
                        <Columns>
                            <asp:CommandField SelectText="Selecionar" ShowSelectButton="True" />
                            <asp:BoundField DataField="VeiculoID" HeaderText="VeículoID" />
                            <asp:BoundField DataField="Placa" HeaderText="Placa" />
                            <asp:BoundField DataField="Marca" HeaderText="Marca" />
                            <asp:BoundField DataField="Modelo" HeaderText="Modelo" />
                            <asp:BoundField DataField="AnoFab" HeaderText="Ano Fab" />
                            <asp:BoundField DataField="AnoMod" HeaderText="Ano Mod" />
                        </Columns>
                        <HeaderStyle BackColor="#3F3F3F" ForeColor="White" />
                        <SelectedRowStyle BackColor="#3F3F3F" ForeColor="White" />
                    </asp:GridView>
                </div>
                <div id="divDados" class="divDadosPerfilVe">
                    <div class="divHeaderCad">Dados do Veículo</div>
                    <asp:UpdatePanel ID="UpdatePanel" runat="server">
                        <ContentTemplate>
                            <table class="tableDadosVeiculo">
                                <tr>
                                    <td class="auto-style12">
                                        <asp:Label ID="Label18" runat="server" CssClass="Labels" Text="Placa*: "></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtPlaca" runat="server" Width="320px"></asp:TextBox>
                                        <AjaxControlToolkit:MaskedEditExtender ID="MaskedEditExtender5" runat="server" ClearMaskOnLostFocus="False" Mask="AAA\-9999" TargetControlID="txtPlaca">
                                        </AjaxControlToolkit:MaskedEditExtender>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="txtPlaca"
                                            ErrorMessage="*Campo obrigatório!" ForeColor="Red" ValidationGroup="vgtxt"></asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="auto-style12">
                                        <asp:Label ID="Label19" runat="server" CssClass="Labels" Text="Marca*: "></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtMarca" runat="server" Width="320px"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server"
                                            ControlToValidate="txtMarca" ErrorMessage="*Campo obrigatório!" ForeColor="Red" ValidationGroup="vgtxt"></asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="auto-style12">
                                        <asp:Label ID="Label20" runat="server" CssClass="Labels" Text="Modelo*: "></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtModelo" runat="server" Width="320px"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server"
                                            ControlToValidate="txtModelo" ErrorMessage="*Campo obrigatório!" ForeColor="Red" ValidationGroup="vgtxt"></asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="auto-style12">
                                        <asp:Label ID="Label21" runat="server" CssClass="Labels" Text="Ano de Fabricação: "></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtAnoFab" runat="server" Width="320px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="auto-style12">
                                        <asp:Label ID="Label22" runat="server" CssClass="Labels" Text="Ano do Modelo: "></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtAnoMod" runat="server" Width="320px"></asp:TextBox>
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                        <Triggers>                            
                            <asp:AsyncPostBackTrigger ControlID="btnNovo" EventName="Click" />
                            <asp:AsyncPostBackTrigger ControlID="btnEditar" EventName="Click" />
                            <asp:AsyncPostBackTrigger ControlID="btnCancelar" EventName="Click" />
                        </Triggers>
                    </asp:UpdatePanel>
                </div>
                <div id="divBotoes" class="divBotoesPerfilDadosVe">
                    <asp:Button ID="btnNovo" runat="server" CssClass="botoesPerfilDadosVe" ForeColor="White" Text="Novo" OnClick="btnNovo_Click" />
                    <asp:Button ID="btnEditar" runat="server" CssClass="botoesPerfilDadosVe" ForeColor="White" Text="Editar" OnClick="btnEditar_Click" />
                    <asp:Button ID="btnCancelar" runat="server" CssClass="botoesPerfilDadosVe" ForeColor="White" Text="Cancelar" OnClick="btnCancelar_Click" />
                    <asp:Button ID="btnExcluir" runat="server" CssClass="botoesPerfilDadosVe" ForeColor="White" Text="Excluir" OnClick="btnExcluir_Click" />
                    <asp:Button ID="btnSalvar" runat="server" ValidationGroup="vgtxt" CssClass="botoesPerfilDadosVe" ForeColor="White" Text="Salvar" OnClick="btnSalvar_Click" />
                </div>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="gridVeiculos" EventName="SelectedIndexChanged" />
            <asp:AsyncPostBackTrigger ControlID="btnNovo" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnEditar" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnCancelar" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
